package plSqlParse

import (
	"errors"
	"github.com/antlr4-go/antlr/v4"
)




//type PlSqlLexerBase struct {
//	*antlr.BaseLexer
//	channelNames []string
//	modeNames    []string
//	input     string
//	version   int
//	charIndex int // Current character index
//}
//type PlSqlParserBase struct {
//	*antlr.BaseParser
//	CustomErrorHandler
//}

type CustomErrorHandler struct {
	antlr.DefaultErrorStrategy
	hasError bool
	err      error
}

func (h *CustomErrorHandler) Recover(parser antlr.Parser, e antlr.RecognitionException) {
	h.hasError = true
	h.err = errors.New(e.GetMessage())
}

func (h *CustomErrorHandler) HasError() bool {
	return h.hasError
}

func (h *CustomErrorHandler) GetError() error {
	return h.err
}

func (h *PlSqlParserBase) GetError() antlr.RecognitionException {
	return nil
}
